package cn.gjxblog.validation.spring.demo2;

import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;

@Validated(Default.class)
public interface HelloService {
    @NotNull
    Object hello(@NotNull @Min(10)Integer id,@NotNull String name);

    @NotEmpty
    String hello2(@NotNull @Min(10)Integer id,@NotNull String name);

    void savePerson(@NotNull Person person);
    void savePerson3(@Valid Person person);

    void savePerson2(@Valid Person person, @NotNull Person person2);
}
